package com.lancoo.cvas.pojo.common;

/**
 * @Author: liufeng
 * @CreateTime: 2023-12-15  14:52
 * @Description:
 */
public enum ScheduleState {

//    排课状态 1已排（正常）、2已排（未满足规则）、3已排（冲突）、4 待排

    NORMAL(1,"已排（正常）"),
    UNSUITABLE(2,"已排（未满足规则）"),
    CONFLICT(3,"已排（冲突）"),
    UNARRANGE(4,"待排");

    private int code;
    private String msg;

    ScheduleState(int code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static ScheduleState getByCode(int code){
        for (ScheduleState value : ScheduleState.values()) {
            if (value.getCode() == code){
                return value;
            }
        }
        return null;
    }
}
